{include file="public/header"}
<div class="layui-fluid">
  <div class="layui-card">
    <div class="layui-card-body">
      <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">
        <div class="layui-form-item">
          <label class="layui-form-label">上级菜单</label>
          <div class="layui-input-inline">
            <select name="pid" lay-filter="aihao">
              <option value="0">作为顶级菜单</option>
              {volist name="$menus" id="vo"}
              <option value="{$vo.id}" {notempty name="$menu.pid"}{eq name="$menu.pid" value="$vo.id"} selected=""{/eq}{else /}{notempty name="$pid"}{eq name="$pid" value="$vo.id"} selected=""{/eq}{/notempty}{/notempty}>{$vo.str|raw}{$vo.name}</option>
              {/volist}
            </select>
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">名称</label>
          <div class="layui-input-inline">
            <input name="name" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text" {notempty name="$menu.name"}value="{$menu.name}"{/notempty}>
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">模块名</label>
          <div class="layui-input-inline">
            <input name="module" placeholder="请输入" autocomplete="off" class="layui-input" type="text" {notempty name="$menu.module"}value="{$menu.module}"{/notempty}>
          </div>
          <div class="layui-form-mid layui-word-aux">如果仅作为父级菜单，请留空</div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">控制器名</label>
          <div class="layui-input-inline">
            <input name="controller" placeholder="请输入" autocomplete="off" class="layui-input" type="text" {notempty name="$menu.controller"}value="{$menu.controller}"{/notempty}>
          </div>
          <div class="layui-form-mid layui-word-aux">如果仅作为父级菜单，请留空</div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">方法名</label>
          <div class="layui-input-inline">
            <input name="function" placeholder="请输入" autocomplete="off" class="layui-input" type="text" {notempty name="$menu.function"}value="{$menu.function}"{/notempty}>
          </div>
          <div class="layui-form-mid layui-word-aux">如果仅作为父级菜单，请留空</div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">参数</label>
          <div class="layui-input-inline">
            <input name="parameter" placeholder="请输入" autocomplete="off" class="layui-input" type="text" {notempty name="$menu.parameter"}value="{$menu.parameter}"{/notempty}>
          </div>
          <div class="layui-form-mid layui-word-aux">请用'&'隔开，例如：name=tingyu&id=10</div>
        </div>
        <div class="layui-form-item layui-form-text">
          <label class="layui-form-label">备注</label>
          <div class="layui-input-block" style="max-width:600px;">
            <input name="description" placeholder="请输入" class="layui-input" type="text" value="{$menu.description|default=''}" />
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">图标</label>
          <div class="layui-input-inline">
            <input name="icon" placeholder="请输入" autocomplete="off" class="layui-input" type="text" {notempty name="$menu.icon"}value="{$menu.icon}"{/notempty}>
          </div>
          <div class="layui-form-mid layui-word-aux">如:layui-icon-component，图标参考：<a href="https://www.layui.com/doc/element/icon.html" target="_blank">查看</a></div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">菜单类型</label>
          <div class="layui-input-inline">
            <select name="is_display" lay-filter="aihao">
              <option value="1" {notempty name="$menu.is_display"}{eq name="$menu.is_display" value="1"} selected=""{/eq}{/notempty}>显示在左侧菜单</option>
              <option value="2" {notempty name="$menu.is_display"}{eq name="$menu.is_display" value="2"} selected=""{/eq}{/notempty}>只做为操作节点</option>
            </select>
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">节点类型</label>
          <div class="layui-input-inline">
            <select name="type" lay-filter="aihao">
              <option value="1" {notempty name="$menu.type"}{eq name="$menu.type" value="1"} selected=""{/eq}{/notempty}>权限节点</option>
              <option value="2" {notempty name="$menu.type"}{eq name="$menu.type" value="2"} selected=""{/eq}{/notempty}>普通节点</option>
            </select>
          </div>
          <div class="layui-input-inline">
            <div class="layui-form-mid layui-word-aux">注意：如果是菜单+权限节点，那么该菜单将对没有权限的角色隐藏</div>
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">排序</label>
          <div class="layui-input-inline">
            <input name="sort" placeholder="请输入，例如99" autocomplete="off" class="layui-input" type="text" {notempty name="$menu.sort"}value="{$menu.sort}"{/notempty}>
          </div>
          <div class="layui-form-mid layui-word-aux">菜单排序排放，数值越小越靠前</div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">默认展开</label>
          <div class="layui-input-block">
              <div class="layui-input-inline">
                <input type="checkbox" name="is_open" lay-skin="switch" lay-text="ON|OFF" value="1" {notempty name="$menu.is_open"}{eq name="$menu.is_open" value="1"}checked=""{/eq}{/notempty}>
              </div>
              <div class="layui-form-mid layui-word-aux">仅支持到二级菜单</div>
          </div>
        </div>
        <div class="layui-form-item layui-hide">
          <input type="button" lay-submit lay-filter="layuiadmin-app-form-edit" id="layuiadmin-app-form-edit" value="编辑">
        </div>
        <input type="hidden" name="id" value="{$menu.id|default=0}">
      </div>
    </div>
  </div>
</div>
<script>
layui.use(['layer', 'form'], function() {
    // var $ = layui.jquery,
    //         layer = layui.layer,
    //         form = layui.form;
});
</script>
{include file="public/footer"}